<template>
  <div>
    HOME{{obj}}
    <button @click='fn'>fn</button>
    <!-- <router-view></router-view> -->
  </div>
</template>
<script>
// @ is an alias to /src
export default {
  name: "XXX",
  data() {
    return {
      obj: {
        a: 123,
      },
    };
  },
  methods: {
    fn() {
      // this.obj.b = 666;
      // this.obj = { ...this.obj, b: 666 };
      // this.$set(this.obj, "n", 666);
      this.obj.a = 666;
      // console.log(this.$set);
    },
  },
  watch: {
    obj: {
      deep: true,
      handler() {
        console.log("obj");
      },
    },
  },
  components: {},
};
</script>
<style lang="less">
</style>